// Copyright 2022 jeff.li. and/or its affiliates.

#pragma once

#include <tbir/pipeline/global_unique_index.h>
#include <tbir/pipeline/op_kernel.h>
#include <tbir/runtime/container_private.h>
#include <tbir/runtime/file_util.h>
#include <tbir/runtime/native_object_registry.h>

namespace tbir::runtime {

    class Future {
    public:
        Future() : body_(nullptr) {
        }

        ~Future() = default;

        void set_body(std::function<RTValue()> body);

        RTValue get() const;

        static UserDataRef make_future_udref(std::function<RTValue()> body);

    private:
        std::function<RTValue()> body_;
    };

}  // namespace tbir::runtime
